home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-19 | 66.4 KB | 2,651 lines |
- # This is a shell archive. Remove anything before this line,
- # then unpack it by saving it in a file and typing "sh file".
- #
- # Wrapped by Scott J. Norton <sjn@hpisod9> on Tue Jun 18 15:02:05 1991
- #
- # This archive contains:
- # Makefile format title.nr preface.nr
- # overview.nr desc.nr rrip.nr api.begin.nr
- # api.cmd.nr api.lib.nr api.end.nr bib.nr
- # TOC
- #
-
- LANG=""; export LANG
- PATH=/bin:/usr/bin:$PATH; export PATH
-
- echo x - Makefile
- sed 's/^@//' >Makefile <<'@EOF'
- # Makefile for CDROM
- # Written by Scott Norton
- #
- SHELL=/bin/sh
- # Delete all the built-in rules
- @.SUFFIXES :
-
- SOURCE = format title.nr preface.nr overview.nr desc.nr rrip.nr api.begin.nr api.cmd.nr api.lib.nr api.end.nr bib.nr TOC
-
- TROFF = /usr/bin/troff
-
- irs:
- cat $(SOURCE) | pic | tbl | $(TROFF) -mm
- print:
- cat $(SOURCE) | pic | tbl | $(TROFF) -o12-14 -mm
- troff:
- cat $(SOURCE) | pic | tbl | $(TROFF) -o17-20 -mm -rT1 > troff.out
- ci:
- ci -l $(SOURCE)
-
- shar:
- shar Makefile $(SOURCE) > rrip.shar
-
- revision:
- @echo "The current revision number is:"
- @fgrep Revision title.nr
-
- wc:
- @echo "\tThe number of lines of source are:\c"
- @cat $(SOURCE) | wc -l
- order:
- @echo "The order of the files is ---"
- @echo $(SOURCE) | tr " " "\012"
-
- title:
- cat format title.nr | tbl | $(TROFF) -mm
- preface:
- cat format preface.nr | tbl | $(TROFF) -mm
- overview:
- cat format overview.nr | tbl | $(TROFF) -mm
- desc:
- cat format desc.nr | tbl | $(TROFF) -mm
- rrip:
- cat format rrip.nr | pic | tbl | $(TROFF) -mm
- api:
- cat format api.begin.nr api.cmd.nr api.lib.nr api.end.nr | tbl | $(TROFF) -mm
- bib:
- cat format bib.nr | tbl | $(TROFF) -mm
-
- @EOF
-
- chmod 644 Makefile
-
- echo x - format
- sed 's/^@//' >format <<'@EOF'
- @.nr O 1.2i
- @.nr W 6i
- @.PH "" \" Supress the -1- page header on the first page
- @.\" The entire document uses fonts designated as numbers so the following
- @.\" three lines may be changed to change the "look" of the document.
- @.fp 1 R \" This is the standard (i.e. non-Bold/Italic) font position
- @.fp 2 I \" This is the Italic font position
- @.fp 3 B \" This is the Bold font position
- @.fp 4 S \" This is the HP logo
- @.nr P 0 \" Set first page to be page 1
- @.\" HF sets type for .H headings 3==bold, 2==italics for levels 1-7
- @.ds HF 3 3 3 3 3 3 3
- @.\" HF sets size for .H headings, for level 1-7
- @.ds HP 14 12 11 11 11 11 11
- @.nr Ej 1 \" Start level 1 headings on new page.
- @.nr Hb 6 \" Headings 7 & up are part of the following paragraph
- @.nr Hs 6 \" Headings 1-6 are automatically followed by blank line
- @.nr Hi 1 \" Indent text following heading like paragraph (default)
- @.nr Hc 0 \" No headings are centered (default)
- @.nr Hu 1 \" Unnumbered headings level 1
- @.tr ~ \" Use ~ for unpaddable space character
- @.ad b \" Right-justify on
- @.nr Hy 0 \" No hyphenation
- @.nr Pi 5 \" Indent paragraphs 5 spaces
- @.nr Pt 1 \" Indent paragraphs Pi spaces
- @.nr Cl 6 \" Save first 6 heading levels for table of contents
- @.\" Set up global formatting stuff
- @.in 0i
- @.ll 6i
- @.vs 12p
- @.pl 10.5i
- @.ps 10
- @.\" Set up the page count as if no coversheet will be added. If there is
- @.\" one added, it will override .nr PC to be one more than the amount below.
- @.nr PC 41
- @.\" Set this flag to be 0 (no coversheet), if a coversheet is there, it
- @.\" will override it.
- @.nr CS 0
- @EOF
-
- chmod 644 format
-
- echo x - title.nr
- sed 's/^@//' >title.nr <<'@EOF'
- @~
- @.sp |2.5i
- @.ce 17
- @.ps 25
- @.ft 3
- ROCK RIDGE INTERCHANGE
-
-
- PROTOCOL
- @.ps 20
- @.ft 3
-
-
- VERSION 1
- @.sp 80p
- @.ps 20
- @.ft 3
- AN IS0 9660:1988 COMPLIANT APPROACH
-
- TO PROVIDING ADEQUATE CD-ROM SUPPORT
-
- FOR POSIX FILE SYSTEM SEMANTICS
- @.sp 80p
- @.ps 16
- @.ft 3
- ROCK RIDGE TECHNICAL
-
- WORKING GROUP
- @.ps 12
- @.ft 1
- @.sp 3v
- Revision 1.09
- @.sp 3v
- @.\" Put names of authors here, if any
- cdtec@dgdo.Eng.Sun.COM
- @.ps 14
- @.sp 3v
- PROPOSAL
- @.bp
- @.\"
- @.\" If no coversheet, set up odd/even different headers & footers
- @.\" else set up the same headers & footers
- @.ie \n(CS \{\
- @. OH "'Rock Ridge Group''Rock Ridge Interchange Protocol'"
- @. EH "'Rock Ridge Group''Rock Ridge Interchange Protocol'"
- @. bp
- @. OF "'\\*(DT' 'Page \\\\nP of \\\\n(PC'"
- @. EF "'\\*(DT' 'Page \\\\nP of \\\\n(PC'" \}
- @.el \{\
- @. OH "'Rock Ridge Group''Rock Ridge Interchange Protocol'"
- @. EH "'Rock Ridge Interchange Protocol''Rock Ridge Group'"
- @. bp
- @. OF "'\\*(DT' 'Page \\\\nP of \\\\n(PC'"
- @. EF "'Page \\\\nP of \\\\n(PC' '\\*(DT'" \}
- @.rs
-
- @.ce
- ( This page should be replaced with a blank page for back of title )
- @.bp
-
- @.ce
- ( This page should be replaced with the Table of Contents )
- @.bp
-
- @.ce
- ( This page should be replaced with a blank page for back of TOC )
- @.bp
-
- @.ce
- ( This page should be replaced with the List of Tables )
- @.bp
-
- @.ce
- ( This page should be replaced with a blank page for back of Tables )
- @EOF
-
- chmod 644 title.nr
-
- echo x - preface.nr
- sed 's/^@//' >preface.nr <<'@EOF'
- @.pn 1
- @.sp
- @.H 1 "PREFACE"
- @.sp
- @.H 2 "Purpose and Scope"
- @.sp
- Producers and users of POSIX compliant systems and software have faced a
- significant, yet artificial, barrier to their effectively using CD-ROM
- technology for software distribution and information publishing --
- ISO 9660:1988 alone provides inadequate support for delivery of POSIX
- file system information.
- The Rock Ridge Group was formed to generate a
- proposed standard for utilizing the System Use Areas provided by the
- ISO 9660 standard to record complete POSIX file system semantics.
- This proposal utilizes the System Use Sharing Protocol for recording this
- information.
- @.sp
- @.H 2 "Summary of Sections"
- @.sp
- @.TS
- center;
- l l.
- Section 1 Contains this preface.
- Section 2 Contains an overview of the Rock Ridge Interchange Protocol.
- Section 3 Contains an overview of the notation used in this document.
- Section 4 Contains the Rock Ridge Interchange Protocol.
- Section 5 Contains the RRIP Application Programming Interface.
- Section 6 Contains the bibliography.
- @.TE
- @.bp
- @.\" Blank page for back of this chapter
- @.ce
-
-
-
-
- @EOF
-
- chmod 644 preface.nr
-
- echo x - overview.nr
- sed 's/^@//' >overview.nr <<'@EOF'
- @.sp
- @.H 1 "OVERVIEW"
- @.sp
- The Rock Ridge Interchange Protocol (RRIP) specifies an extension to the
- ISO 9660 format for CD-ROM which enables the recording of POSIX File
- System semantics.
- The RRIP utilizes the System Use Sharing Protocol (SUSP) to specify
- the definition of a set of System Use Fields for this purpose.
- @.sp
- The RRIP specifies the definition of a set of System Use Fields for
- recording:
- @.sp
- @.VL 15
- @.BL
- @.LI
- uid, gid, and permissions
- @.LI
- file mode bits, file types, setuid, setgid, and sticky bit
- @.LI
- file links
- @.LI
- device nodes
- @.LI
- symbolic links
- @.LI
- POSIX file names
- @.LI
- reconstruction of deep directories
- @.LI
- time stamps
- @.LE
- @.bp
- @.\" Blank page for back of this chapter
- @.ce
-
-
-
-
- @EOF
-
- chmod 644 overview.nr
-
- echo x - desc.nr
- sed 's/^@//' >desc.nr <<'@EOF'
- @.sp
- @.H 1 "TERMINOLOGY AND NOTATION"
- @.sp
- It is assumed that the RRIP is being recorded within an ISO 9660:1988
- compliant volume using the System Use Sharing Protocol (SUSP:1991A).
- Unless defined herein, or otherwise specified, terms shall be as defined
- in ISO 9660:1988 or SUSP:1991A.
- @.sp
- The following notation is used in this document.
- @.sp
- @.H 2 "Decimal and Hexadecimal Notation"
- @.sp
- Numbers in decimal notation are represented by decimal digits, namely
- 0 to 9.
- @.sp
- Numbers in hexadecimal notation are represented by hexadecimal digits,
- namely 0 to 9 and A to F, shown in parentheses.
- E.g. the hexadecimal number 7F will be written as (7F).
- @.sp
- @.H 2 "File Naming Conventions"
- @.sp
- In all fields defined in ISO 9660:1988, the character set to be used
- shall be as specified in ISO 9660.
- The character set to be used in the System Use Fields defined herein
- shall depend upon whether the fields are recorded in a directory tree
- associated with a Primary Volume Descriptor or a Supplementary Volume
- Descriptor.
- @.sp
- @.H 3 "Primary Volume Descriptor File Naming Convention"
- @.sp
- Within a directory tree identified by a Primary Volume Descriptor of
- an ISO 9660 volume, the character set used in the System Use Fields
- defined for the RRIP shall be the ISO Standard 8859-1:1987, as
- specified in the X/Open Portability Guide Issue 3, XSI Supplementary
- Definitions.
- For general portability across most POSIX compatible systems, the
- 7-bit U.S. ASCII character set should be used.
- @.sp
- The POSIX File Naming Convention states that the filename may be
- composed of any character except slash (2F) and the null byte (00).
- The special filename, dot (2E), refers to the directory specified
- by its predecessor.
- The special filename dot-dot (2E)(2E), refers to the parent directory
- of its predecessor directory.
- @.sp
- For maximum portability across implementations conforming to the
- POSIX Standard, filenames should only contain the following characters:
- @.sp
- @.TS
- center;
- l l.
- (41) thru (5A) \'A\' thru \'Z\'
- (61) thru (7A) \'a\' thru \'z\'
- (30) thru (39) \'0\' thru \'9\'
- (2E) period
- (5F) underscore
- (2D) hyphen
- @.TE
- @.sp
- Upper and lower case letters shall retain their unique identities
- between conforming implementations.
- @.sp
- @.H 3 "Supplementory Volume Descriptor File Naming Convention"
- @.sp
- Within a directory tree identified by a Supplementary Volume Descriptor
- of an ISO 9660 volume, the character set used in the System Use Fields
- defined for the RRIP shall be the coded graphic character set(s) identified by
- the escape sequence(s) in the Supplementary Volume Descriptor
- (c-characters, section 7.4.2, ISO 9660:1988).
- @.sp
- @.H 2 "Reader Makes Right"
- @.sp
- Receiving systems which are capable of interpreting the System Use Fields
- defined herein, but which cannot handle the full extent of the file naming
- convention utilized by this specification may have to restrict themselves
- to the use of the ISO 9660 compliant file names stored in the File Identifier
- field of the ISO 9660 directory structure.
- @.sp
- Alternatively, the developer of the receiving system may choose to provide
- file name conversion capability.
- Any such system must provide unique names for all unique files on the disc.
- @.sp
- In general, whenever there is recorded a (potentially) system-specific
- identifier or numerical value, accomplishing any necessary modifications
- or mapping of these are the responsibility of the receiving system.
- This document provides for an Application Programming Interface (API)
- to support this function.
- @.sp
- @EOF
-
- chmod 644 desc.nr
-
- echo x - rrip.nr
- sed 's/^@//' >rrip.nr <<'@EOF'
- @.sp
- @.H 1 "ROCK RIDGE INTERCHANGE PROTOCOL"
- @.sp
- The Rock Ridge Interchange Protocol (RRIP) utilizes System Use Areas
- provided by ISO 9660:1988.
- The System Use Area of the Directory Record is used to record the POSIX
- file system information.
- The System Use Sharing Protocol is used for recording information in
- each of these areas.
- @.sp
- @.H 2 "System Use Fields Provided by this Specification"
- @.sp
- The Rock Ridge Interchange Protocol defines the following fundamental
- System Use Fields:
- @.sp
- @.TS
- center;
- l l.
- "PX" POSIX file attributes
- "PN" POSIX device modes
- "SL" Symbolic link
- "NM" Alternate name
- "CL" Child link
- "PL" Parent link
- "RE" Relocated directory
- "TF" Time stamp(s) for a file
- "RR" Flags indicating which fields are recorded
- @.TE
- @.sp
- Additionally, this specification provides required identification information
- to be recorded in an "ER" (Extensions Reference) System Use Field for the
- purpose of identifying discs on which the Rock Ridge Interchange Protocol
- is implemented.
- @.sp
- @.H 3 "Description of the PX System Use Field"
- @.sp
- Recording of the "PX" System Use Field in the System Use Area of
- each ISO 9660 directory record shall be mandatory.
- No more than one
- "PX" System Use Field shall appear in (all) the System Use Area(s) for
- a single directory record.
- @.sp
- If the file type in a directory record is of type directory, then
- the POSIX File Mode Field ([BP 4] in this section) and File Flags (ISO
- 9660 Format section 9.1.6) should both indicate such, with the
- exception of relocated directories, indicated by a "CL" field (section
- 3.1.5.1), for which the ISO file flags shall indicate a normal file,
- but the POSIX File Mode Field shall indicate a directory.
- @.sp
- The format of the "PX" System Use Field is as follows:
- @.sp
- @.VL 10 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "PX" type System Use Field.
- The bytes in this field shall be (50)(58) ("PX").
- @.LI "[2]"
- "BP 3 - Length" shall specify as an 8-bit number the length in
- bytes of the "PX" System Use Field.
- The number in this field shall be 36 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.bp
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "PX" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[4]"
- "BP 5 to BP 12 - POSIX File Mode" has the same meaning as the st_mode
- defined in the header sys/stat.h by the IEEE Std 1003.1-1988.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.3.3.
- The valid mask values for this field are combinations of the following:
- @.sp
- @.TS
- center;
- l l.
- Octal Value Meaning
- \_ \_
- 0000400 read permission (owner)
- 0000200 write permission (owner)
- 0000100 execute permission (owner)
- 0000040 read permission (group)
- 0000020 write permission (group)
- 0000010 execute permission (group)
- 0000004 read permission (other)
- 0000002 write permission (other)
- 0000001 execute permission (other)
-
- 0004000 set user ID on execution
- 0002000 set group ID on execution
- 0002000 enforced file locking (shared w/ set group ID)
- 0001000 save swapped text even after use
-
- 0170000 type of file
- 0140000 socket
- 0120000 symbolic link
- 0100000 regular
- 0060000 block special
- 0020000 character special
- 0040000 directory
- 0010000 pipe or FIFO
- @.TE
- @.sp
- @.LI "[5]"
- "BP 13 to BP 20 - POSIX File Links" has the same meaning as the
- st_nlink defined in the header sys/stat.h by the IEEE Std 1003.1-1988.
- If the file type described by the directory record is a
- directory, the value in this field shall equal the number of
- directories in the directory described by this directory record
- (i.e. any directory record which has the "directory" bit set,
- including the "." and ".." records).
- Otherwise, it shall be 1.
- This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
- @.LI "[6]"
- "BP 21 to BP 28 - POSIX File User ID" has the same meaning as the
- st_uid defined in the header sys/stat.h by the IEEE Std 1003.1-1988.
- This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
- @.bp
- @.LI "[7]"
- "BP 29 to BP 36 - POSIX File Group ID" has the same meaning as the
- st_gid defined in the header sys/stat.h by the IEEE Std 1003.1-1988.
- This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
- @.sp
- @.sp
- @.TB "PX System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c | c | c.
-
- 'P' 'X' LENGTH 1 FILE MODE LINKS
- (BP1) (BP2) (BP3) (BP4) (BP5 to BP12) (BP13 to BP20)
-
- @.TE
- @.sp
- @.TS
- center,box;
- c | c.
-
- USER ID GROUP ID
- (BP21 to BP28) (BP29 to BP36)
-
- @.TE
- @.sp
- @.sp
- @.sp
- @.H 3 "Description of the PN System Use Field
- @.sp
- This field is mandatory if the file type recorded in the "PX"
- File Mode field for the given directory record indicates a character or block
- device.
- This field, if present, should be ignored for all other file types.
- No more than one "PN" System Use Field shall appear in (all)
- the System Use Area(s) for a single directory record.
- @.sp
- If the receiving system records device numbers as 32-bit numbers,
- only the "Dev_t Low" field shall be used.
- If the receiving system records device numbers as 64-bit numbers,
- the "Dev_t High" and "Dev_t Low" fields shall be concatenated to make
- one 64-bit number.
- @.sp
- The format of the "PN" System Use Field is as follows:
- @.sp
- @.VL 10 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "PN" type System Use Field.
- The bytes in this field shall be (50)(4E) ("PN").
- @.LI "[2]"
- "BP 3 - Length" shall specify as an 8-bit number the length in
- bytes of the "PN" System Use Field.
- The number in this field shall be 20 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "PN" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.bp
- @.LI "[4]"
- "BP 5 to BP 12 - Dev_t High" shall contain as a 32-bit number
- the high order 32 bits of the device number.
- If the receiving system records device numbers as 32-bit numbers this field
- shall be zero and ignored.
- This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
- @.LI "[5]"
- "BP 13 to BP 20 - Dev_t Low" shall contain as a 32-bit number
- the low order 32-bits of the device number.
- This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
- @.LE
- @.sp
- @.sp
- @.TB "PN System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c | c | c.
-
- 'P' 'N' 20 1 DEV_T HIGH DEV_T LOW
- (BP1) (BP2) (BP3) (BP4) (BP5 to BP12) (BP13 to BP20)
-
- @.TE
- @.sp
- @.sp
- @.sp
- @.H 3 "Description of the SL System Use Field"
- @.sp
- The purpose of the "SL" System Use Field is to store the content
- of a symbolic link.
- This System Use Field is mandatory if the file
- type recorded in the "PX" File Mode field for the given directory record
- indicates a symbolic link.
- For other file types, this System Use Field should be ignored.
- If the receiving system does not support symbolic links the system should
- invoke "Reader-Makes-Right".
- @.sp
- If the file type recorded in the "PX" File Mode field for the given directory
- record indicates a symbolic link, the directory record shall point to a file,
- the contents of which are not specified by this document.
- @.sp
- If more than one "SL" System Use Field is recorded in the System
- Use Area(s) for a single directory record, the Component Area (see
- section 4.1.3.1
- below) of each should be concatenated together, in the order in which
- they were recorded, until a CONTINUE flag with value zero is
- encountered (see [4] below), to obtain the entire set of Component
- Records for the symbolic link.
- @.sp
- The method of recording is system independent.
- Under reader makes right, the receiving system is responsible for supplying
- appropriate values and/or notations for the component delimiter and
- special cases provided for below.
- @.sp
- @.bp
- The format of the "SL" System Use Field is as follows:
- @.sp
- @.VL 10 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "SL" type System Use Field.
- The bytes in this field shall be (53)(4C) ("SL").
- @.LI "[2]"
- "BP 3 - Length (LEN_SL)" shall specify as an 8-bit number the length in
- bytes of the "SL" System Use Field.
- The number in this field shall be 5 plus the length of the Component
- Area recorded in this "SL" field.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "SL" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[4]"
- "BP 5 - Flags" shall contain bit field flags numbered 0
- to 7 starting with the least significant bit as follows:
- @.sp
- @.TS
- center;
- c c l.
- Position Name Interpretation if set to 1
- \_ \_ \_
- 0 CONTINUE This Symbolic Link continues in next "SL"
- all others RESERVED value must be 0
- @.TE
- @.sp
- @.LI "[5]"
- "BP 6 to LEN_SL - Component Records" shall contain Component Records
- (described below).
- @.LE
- @.sp
- @.sp
- @.TB "SL System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c | c | c.
-
- 'S' 'L' LENGTH 1 FLAGS COMPONENT RECORDS
- (BP1) (BP2) (BP3) (BP4) (BP5) (BP6 to LEN_SL)
-
- @.TE
- @.sp
- @.sp
- @.sp
- @.H 4 "Description of the SL System Use Field Component Record"
- @.sp
- Within a "SL" System Use Field, each component of the pathname shall
- be recorded as one or more component records.
- A component does not contain the component separator (/ in POSIX).
- Recording a single component of a symbolic
- link may require multiple Component Records.
- If the component is greater than 255 bytes or will not fit into the current
- System Use Area or Continuation Area more than one Component Record will be
- recorded for the component.
- Multiple Component Records, specifying one or more separate components
- of the symbolic link may be recorded in the Component Area of a
- single "SL" field.
- @.sp
- If a single Component Record is used to record a single component of a
- symbolic link, the CONTINUE flag must be set to zero.
- If multiple Component Records are used to record a single
- component of a symbolic link, the CONTINUE flag must be set to one in
- each Component Record except the last and zero in the last Component
- Record recording the given component.
- @.sp
- Component Records shall be recorded contiguously within each
- Component Area, starting in the first byte of each Component Area.
- The last Component Record in the Component Area of an "SL" field may
- be continued in the Component Area of the next recorded "SL" field.
- @.sp
- Each Component Record shall have the following format:
- @.sp
- @.VL 10 5
- @.LI "[A]"
- "BP 1 - Component Flags" shall contain bit field flags numbered 0
- to 7 starting with the least significant bit as follows:
- @.sp
- @.TS
- center;
- c c l.
- Position Name Interpretation if set to 1
- \_ \_ \_
- 0 CONTINUE Component recorded in this "SL" continues
- in next "SL" Component Record
- 1 CURRENT Component refers to the current directory
- (. in POSIX)
- 2 PARENT Component refers to the parent of the
- current directory (.. in POSIX)
- 3 ROOT Component refers to the root of the current
- directory tree for this process (/ in POSIX)
- 4 VOLROOT Component refers to the directory the
- current CD-ROM volume is mounted on
- 5 HOST The local host name should be inserted as
- the value of the current component
- all others RESERVED value must be 0
- @.TE
- @.sp
- Bits 1 - 7 are mutually exclusive.
- @.sp
- @.LI "[B]"
- "BP 2 - Component Length (LEN_CP)" shall specify as an 8-bit number the
- length in bytes of the (portion of) the component recorded in the
- current Component Record.
- This length shall not include the Component Record Flags byte or Length byte.
- If any of the
- 2\s-1\u1\d\s0 thru 2\s-1\u5\d\s0
- bits are set, the value of this field shall be zero.
- This field shall be recorded according to ISO 9660:1988 Format section 7.1.1.
- @.sp
- @.LI "[C]"
- "BP 3 to 2 + LEN_CP - Component" shall contain (the portion of) the component
- recorded in the current Component Record.
- The content of this field shall be recorded according to section 3.2 above.
- @.LE
- @.sp
- @.sp
- @.TB "SL System Use Field - Component Record"
- @.TS
- center,box;
- c | c | c.
-
- COMP_FLAGS COMP_LEN COMPONENT
- (BP1) (BP2) (BP3 to 2+LEN_CP)
-
- @.TE
- @.sp
- @.sp
- @.bp
- @.sp
- @.H 3 "Description of the NM System Use Field"
- @.sp
- The purpose of the "NM" System Use Field is to store the content
- of an Alternate Name to support POSIX-style or other names.
- This System Use Field is optional.
- If no "NM" field(s) are recorded for a
- specific directory record, the ISO 9660 file identifier shall be used.
- @.sp
- If more than one "NM" System Use Field appears in (all) the
- System Use Area(s) for a single directory record, the contents ([5]
- below) of each should be concatenated together, in the order in which
- they were recorded, until a CONTINUE flag with value zero is
- encountered (see [4] below), to obtain the entire Alternate Name.
- @.sp
- "NM" System Use Fields recorded for the ISO 9660 directory
- records with names (00) and (01), used to designate the current and
- parent directories, respectively, should be ignored.
- Instead, the receiving system should convert these names to the appropriate
- receiving system-dependent designations for the current and parent
- directories.
- @.sp
- No sorting of the directory records by Alternate Names is
- specified by the RRIP, nor can one necessarily be imposed by
- originating systems or assumed by receiving systems.
- The ISO 9660 specifies a sorting order based upon the ISO 9660 file
- identifier (see ISO 9660:1988, section 9.3).
- @.sp
- The format of the "NM" System Use Field is as follows:
- @.sp
- @.VL 10 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "NM" type System Use Field.
- The bytes in this field shall be (4E)(4D) ("NM").
- @.LI "[2]"
- "BP 3 - Length (LEN_NAM)" shall specify as an 8-bit number the length in
- bytes of the "NM" System Use Field.
- The number in this field shall be 5 plus the length (of the portion)
- of the Alternate Name recorded in this "NM" field.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "NM" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.bp
- @.LI "[4]"
- "BP 5 - Flags" shall contain bit field flags numbered 0
- to 7 starting with the least significant bit as follows:
- @.sp
- @.TS
- center;
- c c l.
- Position Name Interpretation if set to 1
- \_ \_ \_
- 0 CONTINUE Alternate Name continues in next "NM"
- field
- 1 CURRENT Alternate Name refers to the current
- directory (. in POSIX)
- 2 PARENT Alternate Name refers to the parent of
- the current directory (.. in POSIX)
- 3 RESERVED value must be 0
- 4 RESERVED value must be 0
- of the current CD-ROM volume
- 5 HOST The local host name should be inserted as
- the value of the Alternate Name
- all others RESERVED value must be 0
- @.TE
- @.sp
- Bits 1 - 7 are mutually exclusive.
- @.sp
- @.LI "[5]"
- "BP 6 to LEN_NAM - Alternate Name" shall contain (a portion of) the
- content of the Alternate Name.
- The content of this field shall be recorded according to section 3.2 above.
- @.LE
- @.sp
- @.sp
- @.TB "NM System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c | c | c.
-
- 'N' 'M' LENGTH 1 FLAGS ALTERNATE NAME
- (BP1) (BP2) (BP3) (BP4) (BP5) (BP6 to LEN_NAM)
-
- @.TE
- @.sp
- @.sp
- @.sp
- @.H 3 "System Use Fields for Handling Deep Directory Trees"
- @.sp
- The ISO 9660:1988 mandates directory depths of no more than eight levels.
- Deeper directories must be reorganized to be recorded under the ISO 9660.
- The RRIP includes definitions of three System Use
- Fields to support logical reconstruction of deep directory trees while
- retaining complete ISO 9660 compliance.
- @.sp
- For each specific directory, either all three of the following
- fields must be appropriately recorded, or none shall be recorded.
- @.sp
- Table 9 and Table 10 at the end of this section have graphical examples
- of Deep Directory Trees.
- @.bp
- @.H 4 "Description of the CL System Use Field"
- @.sp
- The purpose of the "CL" System Use Field is to record the new
- location of a directory which has been relocated.
- The field contains the Logical Block number of the Logical Sector in which
- the first directory record of the moved Directory is stored.
- @.sp
- The "CL" System Use Field is optional.
- If recorded, a "CL" System Use Field shall be recorded in the System Use
- Area of a ISO 9660 directory record which describes a file which has the
- same name as, and occupies the original position in the ISO 9660 directory tree
- of, the moved Directory.
- No more than one "CL" System Use Field shall appear in (all) the System Use
- Area(s) for a single directory record.
- @.sp
- Except for the ISO 9660 name, the Alternate Name (recorded in an
- "NM" System Use Field), and the new location of the Directory, all
- other information stored in the directory for this file should
- be ignored.
- The contents of this file are not specified by this document.
- All attributes of the moved Directory shall be recorded in the first directory
- record ("dot" entry) of the moved Directory in its new location.
- @.sp
- The format of the "CL" System Use Field is as follows:
- @.sp
- @.VL 10 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "CL" type System Use Field.
- The bytes in this field shall be (43)(4C) ("CL").
- @.LI "[2]"
- "BP 3 - Length" shall specify as an 8-bit number the length in
- bytes of the "CL" System Use Field.
- The number in this field shall be 12 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "CL" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[4]"
- "BP 5 to BP 12 - Location of Child Directory" shall specify as a
- 32-bit number the Logical Block Number of the first Logical Block
- allocated to the moved directory.
- This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
- @.LE
- @.sp
- @.sp
- @.TB "CL System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c | c.
-
- 'C' 'L' 12 1 LOC of CHILD DIRECTORY
- (BP1) (BP2) (BP3) (BP4) (BP5 to BP12)
-
- @.TE
- @.sp
- @.sp
- @.bp
- @.sp
- @.H 4 "Description of the PL System Use Field"
- @.sp
- The purpose of the "PL" System Use Field is to record the
- location of the original parent Directory of a Directory which has
- been relocated.
- The field contains the Logical Block number of the
- Logical Sector in which the first directory record of the original
- parent Directory of said moved Directory is stored.
- @.sp
- For each moved Directory which is recorded using a "CL" System
- Use Field, a corresponding "PL" System Use Field is required.
- The "PL" System Use Field shall be recorded in the System Use Area of the
- second directory record ("dot-dot" entry) of the moved Directory.
- No more than one "PL" System Use Field shall appear in (all) the System
- Use Area(s) for a single directory record.
- @.sp
- The format of the "PL" System Use Field is as follows:
- @.sp
- @.VL 10 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "PL" type System Use Field.
- The bytes in this field shall be (50)(4C) ("PL").
- @.LI "[2]"
- "BP 3 - Length" shall specify as an 8-bit number the length in
- bytes of the "PL" System Use Field.
- The number in this field shall be 12 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "PL" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[4]"
- "BP 5 to BP 12 - Location of Parent Directory" shall specify as a
- 32-bit number the Logical Block Number of the first Logical Block
- allocated to the original parent directory of the moved directory.
- This field shall be recorded according to ISO 9660:1988 Format section 7.3.3.
- @.LE
- @.sp
- @.sp
- @.TB "PL System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c | c.
-
- 'P' 'L' 12 1 LOC of PARENT DIRECTORY
- (BP1) (BP2) (BP3) (BP4) (BP5 to BP12)
-
- @.TE
- @.sp
- @.sp
- @.bp
- @.sp
- @.H 4 "Description of the RE System Use Field"
- @.sp
- The purpose of the "RE" System Use Field is to indicate to a
- receiving system which can understand the System Use Fields "CL" and
- "PL" that the directory record in which this "RE" System Use Field is
- recorded has been relocated from another position in the original
- directory tree.
- @.sp
- An "RE" System Use Field shall not be recorded unless a corresponding
- "CL" System Use Field is recorded.
- If recorded, a "RE" System Use Field shall be recorded in
- the System Use Area of the directory record which describes the moved
- Directory in the new parent directory of the moved Directory.
- @.sp
- The format of the "RE" System Use Field is as follows:
- @.sp
- @.VL 10 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "RE" type System Use Field.
- The bytes in this field shall be (52)(45) ("RE").
- @.LI "[2]"
- "BP 3 - Length" shall specify as an 8-bit number the length in
- bytes of the "RE" System Use Field.
- The number in this field shall be 4 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "RE" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LE
- @.sp
- @.sp
- @.TB "RE System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c.
-
- 'R' 'E' 4 1
- (BP1) (BP2) (BP3) (BP4)
-
- @.TE
- @.sp
- @.sp
- @.bp
- @.sp
- @.TB "Deep Directory Relocation"
- @.sp
- @.sp
- @.PS
- @.ft 3
- arrowhead = 7
- box "1"
- circle invis "(root)"
-
- box "2a" at 1st box + (-2.5, -1.0)
- box "2b" at 1st box + (-1.5, -1.0)
- box "2c" at 1st box + (-.50, -1.0)
- line from bottom of 1st box to top of 2nd box
- line from bottom of 1st box to top of 3rd box
- line from bottom of 1st box to top of 4th box
-
- box "3" at 4th box + (-.50, -1.0)
- line from bottom of 4th box to top of 5th box
-
- box "4" at 5th box + (-.50, -1.0)
- box "8" at 5th box + (1.50, -1.0)
- circle "\"RE\"" invis
- line from bottom of 5th box to top of 6th box
- line from bottom of 5th box to top of 7th box
- line from bottom of 7th box down .4 left .5
- line from bottom of 7th box down .4 right .5
-
- box "5" at 6th box + (-.50, -1.0)
- line from bottom of 6th box to top of 8th box
-
- box "6" at 8th box + (-.50, -1.0)
- line from bottom of 8th box to top of 9th box
-
- box "7" at 9th box + (-.50, -1.0)
- line from bottom of 9th box to top of 10th box
-
- ellipse "file" at 10th box + (-.50, -1.0)
- line from bottom of 10th box to top of 1st ellipse
-
- arc -> from 1st ellipse + (.40, 0.0) to 7th box + (.20, -.55)
- arc -> cw from 7th box + (-.20, -.55) to 10th box + (.40, 0.0) rad 3
- circle invis "\"PL\"" at 8th box + (1.35, -1.0)
- circle invis "\"CL\"" at 8th box + (2.55, -1.0)
- @.ft 1
- @.PE
- @.bp
- @.TB "Detailed Deep Directory Relocation"
- @.sp
- @.sp
- @.PS
- @.ft 3
- move right 1.0
- A: box invis ht 0.2 wid 2.25 ; " directory foo/ " at A.w ljust
- Aa: box ht 0.2 wid 1.5 with .nw at A.sw ; " \"dot\"" at Aa.w ljust
- Ab: box ht 0.2 wid .75 with .sw at Aa.se ; " rrip..." at Ab.w ljust
- Ac: box ht 0.2 wid 1.5 with .nw at Aa.sw ; " \"dotdot\"" at Ac.w ljust
- Ad: box ht 0.2 wid .75 with .sw at Ac.se ; " rrip..." at Ad.w ljust
- B: box ht 0.2 wid 1.5 with .nw at Ac.sw ; " bar" at B.w ljust
- C: box ht 0.2 wid .75 with .sw at B.se ; " rrip..." at C.w ljust
- F: box ht 0.2 wid 1.5 with .nw at B.sw ; " hidden_baz" at F.w ljust
- G: box ht 0.2 wid .75 with .sw at F.se ; " RE" at G.w ljust
- H: box ht 0.2 wid 1.5 with .nw at F.sw ; " lower" at H.w ljust
- U: box ht 0.2 wid .75 with .sw at H.se ; " rrip..." at U.w ljust
-
- move down .4
- move right 2.0
- Y: box invis ht .2 wid .75 ; " " at Y.w ljust
- X: ellipse ht .4 wid .75 with .nw at Y.sw "File"
-
- move down .75
- move left 1.5
- I: box invis ht 0.2 wid 1.5 ; " directory lower/" at I.w ljust
- J: box ht 0.4 wid 2.55 with .nw at I.sw ; " " at J.w ljust
- K: box ht 0.2 wid .85 with .nw at J.sw ; " empty_baz" at K.w ljust
- L: box ht 0.2 wid .85 with .sw at K.se ; " NM \"baz\"" at L.w ljust
- M: box ht 0.2 wid .85 with .sw at L.se ; " CL" at M.w ljust
-
- move down .75
- move left .25
- Z: ellipse ht .4 wid .75 " File"
-
- move down .75
- N: box invis ht 0.2 wid 2.0 ; " directory baz/ " at N.w ljust
- O: box ht 0.2 wid 1.0 with .nw at N.sw ; " \"dot\"" at O.w ljust
- P: box ht 0.2 wid 1.0 with .sw at O.se ; " rrip..." at P.w ljust
- Q: box ht 0.2 wid 1.0 with .nw at O.sw ; " \"dotdot\"" at Q.w ljust
- R: box ht 0.2 wid 1.0 with .sw at Q.se ; " PL" at R.w ljust
- S: box ht 0.2 wid 1.0 with .nw at Q.sw ; " " at S.w ljust
- T: box ht 0.2 wid 1.0 with .sw at S.se ; " " at T.w ljust
-
- @.\" BAR->FILE
- arc <- from X.n to C.e rad 2.0
-
- @.\" HIDDEN_BAZ->DIR_BAZ
- arc -> from F.w to O.w
-
- @.\" LOWER->DIR_LOWER
- arc -> cw from H.c to J.n rad 3
-
- @.\" EMPTY_BAZX->EMPTY_FILE
- arc -> from K.s to Z.nw rad 3
-
- @.\" CL->DIR_BAZ
- arc -> cw from M.c to P.n rad 2
-
- @.\" PL->DIR_LOWER
- arc -> from R.c to J.ne rad .05
-
- @.ft 1
- @.PE
- @.bp
- @.sp
- @.sp
- @.H 3 "Description of the TF System Use Field"
- @.sp
- The purpose of the "TF" System Use Field is to allow the
- recording of a complete set of time stamps related to a file.
- This System Use Field shall be optional.
- If this field does not exist, the
- POSIX st_atime, st_ctime and st_mtime should have the same value as
- Recording Date and Time Field of the ISO 9660:1988 directory record.
- If both the "TF" System Use Field and the XAR are present, the time
- attributes stored in these two areas must be consistent.
- If only the XAR is present, the st_atime should have the same value as the
- Recording Date and Time Field of the ISO 9660 directory record.
- @.sp
- Multiple "TF" fields may be recorded, using any combination of time
- stamps and time formats, but each individual time stamp may be recorded
- only once per directory record.
- @.sp
- The format of the "TF" System Use Field is as follows:
- @.sp
- @.VL 12 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "TF" type System Use Field.
- The bytes in this field shall be (54)(46) ("TF").
- @.LI "[2]"
- "BP 3 - Length" shall specify as an 8-bit number the length in
- bytes of the "TF" System Use Field.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "TF" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[4]"
- "BP 5 - Flags" shall contain bit field flags numbered 0
- to 7 starting with the least significant bit as follows:
- @.sp
- @.TS
- center;
- c c l.
- Position Name Interpretation if set to 1
- \_ \_ \_
- 0 CREATION Creation time recorded
- 1 MODIFY Modification time recorded
- 2 ACCESS Last Access time recorded
- 3 ATTRIBUTES Last Attribute Change time recorded
- 4 BACKUP Last Backup time recorded
- 5 EXPIRATION Expiration time recorded
- 6 EFFECTIVE Effective time recorded
- 7 LONG_FORM ISO 9660 17-byte time format used
- @.TE
- @.sp
- If the LONG_FORM bit is set to one, all time stamps in this "TF"
- System Use Field shall be recorded using the format specified in
- Section 8.4.26.1 of ISO 9660:1988.
- If the LONG_FORM bit is set to zero, all time stamps in this "TF"
- System Use Field shall be recorded
- using the format specified in Section 9.1.5 of ISO 9660:1988.
- @.LI "[4+N]"
- "BP 6+(X*(N-1)) to 5+(X*N) Time Stamp" shall contain the Nth time
- stamp indicated in [4] as being recorded, starting with the 0th
- bit and working sequentially through the list of recordable time stamps.
- The LONG_FORM bit does not indicate the presence or
- absence of any time stamp.
- The value of X in the expression above
- shall be 17 if the LONG_FORM bit is set to 1, and 7 otherwise.
- @.LE
- @.bp
- @.sp
- The recorded time for each of the time stamps recorded in this
- field shall be local time.
- if recorded, CREATION, Creation Time, has the same meaning as in
- ISO 9660:1988 Format section 9.5.4.
- @.sp
- If recorded, MODIFY, File Modification Date and Time, has the
- same meaning as in ISO 9660:1988 Format section 9.5.5.
- This field shall be used by the st_mtime for POSIX conformance.
- @.sp
- If recorded, ACCESS, File Last Access Date and Time, shall
- specify the date and time of the day at which the information in the
- file was last accessed.
- This field shall be used by the st_atime for POSIX conformance.
- @.sp
- If recorded, ATTRIBUTES, Last Attribute Change Time,
- shall be used by the st_ctime field for POSIX conformance.
- @.sp
- If recorded, BACKUP, Last Backup Time, shall provide a time stamp
- for the most recent backup of this file.
- The utilization of this information is not restricted by this specification.
- @.sp
- If recorded, EXPIRE, File Expiration Date and Time, has the same
- meaning as in ISO 9660:1988 Format section 9.5.6.
- @.sp
- If recorded, EFFECT File Effective Date and Time" has the same
- meaning as in ISO 9660:1988 Format section 9.5.7.
- @.sp
- @.sp
- @.TB "TF System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c | c | c.
-
- 'T' 'F' LENGTH 1 FLAGS TIME STAMPS
- (BP1) (BP2) (BP3) (BP4) (BP5) (BP6 to LENGTH)
-
- @.TE
- @.sp
- @.sp
- @.sp
- @.H 3 "Description of the RR System Use Field"
- @.sp
- The purpose of the "RR" System Use Field is to indicate which
- System Use Fields defined by the Rock Ridge Interchange Protocol are
- actually recorded for the current directory record.
- This System Use Field is optional.
- No more than one "RR" System Use Field shall
- appear in (all) the System Use Area(s) for a single directory record.
- @.sp
- The use of an "RR" field may allow some additional optimization
- in implementations which utilize this information to eliminate
- searching through the entire System Use Area (and all Continuations)
- for a System Use Field which may not even have been recorded.
- For this reason, if an "RR" field is recorded, it should be one of the
- first fields recorded in the System Use Area.
- @.bp
- @.sp
- The format of the "RR" System Use Field is as follows:
- @.sp
- @.VL 10 5
- @.LI "[1]"
- "BP 1 to BP 2 - Signature Word" shall indicate that the System Use Field
- is a "RR" type System Use Field.
- The bytes in this field shall be (52)(52) ("RR").
- @.LI "[2]"
- "BP 3 - Length" shall specify as an 8-bit number the length in
- bytes of the "RR" System Use Field.
- The number in this field shall be 5 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[3]"
- "BP 4 - System Use Field Version" shall specify as an 8-bit number an
- identification of the version of the "RR" System Use Field.
- The number in this field shall be 1 for this version.
- This field shall be recorded according to ISO 9660:1988 Format
- section 7.1.1.
- @.LI "[4]"
- "BP 5 - Flags" shall contain bit field flags numbered 0
- to 7 starting with the least significant bit as follows:
- @.sp
- @.TS
- center;
- c l.
- Position If set to 1, indicates, for this Directory Record
- \_ \_
- 0 "PX" System Use Field recorded
- 1 "PN" System Use Field recorded
- 2 "SL" System Use Field recorded
- 3 "NM" System Use Field recorded
- 4 "CL" System Use Field recorded
- 5 "PL" System Use Field recorded
- 6 "RE" System Use Field recorded
- 7 "TF" System Use Field recorded
- @.TE
- @.LE
- @.sp
- @.sp
- @.TB "RR System Use Field - Version 1"
- @.TS
- center,box;
- c | c | c | c | c.
-
- 'R' 'R' LENGTH 1 FLAGS
- (BP1) (BP2) (BP3) (BP4) (BP5)
-
- @.TE
- @.sp
- @.sp
- @.sp
- @.H 2 "Required Recording and Consistency"
- @.sp
- The "PX" System Use Fields shall be recorded in every directory
- record.
- All recorded instances of the "PX" and "TF" System Use Fields
- in directory records referring to a single directory must be
- consistent.
- @.bp
- @.sp
- @.H 2 "Specification of the ER System Use Field Values for RRIP"
- @.sp
- The Extension Version number for the version of the RRIP defined
- herein shall be 1.
- The content of the Extension Identifier field shall be "RRIP_1991A".
- The Identifier Length shall be 10.
- @.sp
- The recommended content of the Extension Descriptor shall be "THE
- ROCK RIDGE INTERCHANGE PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM
- SEMANTICS."
- The corresponding Description Length is 84.
- @.sp
- The recommended content of the Extension Source shall be "PLEASE
- CONTACT DISC PUBLISHER FOR SPECIFICATION SOURCE. SEE PUBLISHER
- IDENTIFIER IN PRIMARY VOLUME DESCRIPTOR FOR CONTACT INFORMATION."
- The corresponding Source Length is 135.
- @.sp
- @.bp
- @.\" Blank page for back of this chapter
- @.ce
-
-
-
-
- @EOF
-
- chmod 644 rrip.nr
-
- echo x - api.begin.nr
- sed 's/^@//' >api.begin.nr <<'@EOF'
- @.sp
- @.H 1 "RRIP APPLICATION PROGRAMMING INTERFACE (API)"
- @.sp
- This section specifies an Application Programming Interface (API)
- for the Rock Ridge Interchange Protocol which is implemented on top
- of the System Use Sharing Protocol. This API is a supplement to the
- X/Open CD-ROM Support Component (XCDR).
- @.sp
- @.H 2 "Mapping Device Files"
- @.sp
- The major and minor numbers of device files as recorded in the System
- Use Area on the CD-ROM may not match the major and minor numbers
- of the physical devices.
- If that is the case, the command,
- @.I cddevsuppl\^
- can be used to change the major and minor numbers of a specific
- device file on the CD-ROM.
- @.sp
- If the system imposes a maximum value on the number of device file
- mappings, this will be defined via the symbolic name CD_MAXDMAP in
- @.I <sys/cdrom.h>.\^
- At least 50 device file mappings will be supported.
- @.sp
- @.H 2 "Obtaining CD-ROM Specific Information"
- @.sp
- @.H 3 "System Use Sharing Protocol Fields"
- @.sp
- The CD-ROM contains System Use Fields in the System Use Areas which are
- specific to the CD-ROM and cannot be obtained by standard XSI system
- interfaces.
- Using the command
- @.I cdsuf,\^
- or the equivalent library function, all additional information in a
- file or directory System Use Field can be accessed.
- @.sp
- @.H 3 "Changing PX Field Information"
- @.sp
- The "POSIX File User ID" and "POSIX File Group ID" can be mapped on the
- receiving system by using commands and library functions supplied by
- the X/Open CD-ROM Support Component (XCDR).
- @.sp
- @.H 3 "File Name Resolution"
- @.sp
- The fields
- @.I file,\^
- @.I filename,\^
- @.I path,\^
- and
- @.I pathname\^
- shall be resolved according to the Rock Ridge Interchange Protocol, which
- may be the ISO 9660 name or RRIP name depending on whether an "NM" System
- Use Field is present for any component of that filename.
- @.bp
- @EOF
-
- chmod 644 api.begin.nr
-
- echo x - api.cmd.nr
- sed 's/^@//' >api.cmd.nr <<'@EOF'
- @.sp
- @.H 2 "Definition of CD-ROM Specific User Commands"
- @.sp
- This sections provides manual pages which describe CD-ROM user commands
- for users in detail.
- The user commands are:
- @.sp
- @.TS
- center;
- l l.
- Name Description
- \_ \_
-
- cdsuf Retrieve a System Use Field
-
- cddevsuppl Set and get major/minor numbers of a device file
- @.TE
- @.sp
- @.bp
- @.sp
- @.H 3 "cdsuf command"
- @.sp
- @.in 0
- @.ft 3
- NAME
- @.ft 1
- @.in 2
- @.br
- @.ft 3
- cdsuf
- @.ft 1
- - read the System Use Fields from a System Use Area
- @.sp
- @.in 0
- @.ft 3
- SYNOPSIS
- @.ft 1
- @.in 2
- @.ft 3
- @.br
- @.ft 3
- cdsuf
- @.ft 1
- [-s number] [-b] file
- @.sp
- @.in 0
- @.ft 3
- DESCRIPTION
- @.ft 1
- @.in 2
- @.br
- This command is used to access the System Use Fields of the System Use
- Area associated with a File Section of a file or directory and to list
- its contents on standard output, following any Continuation Fields that
- may be present.
- @.sp
- @.in 0
- @.ft 3
- OPTIONS
- @.ft 1
- @.in 2
- @.br
- The following options are available:
- @.VL 15 5
- @.LI "\f3-s number\f1"
- This option specifies the File Section for which the System Use Area shall
- be read.
- The numbering starts with one.
- If this option is omitted the last File Section of that file is assumed.
- @.LI "\f3-b\f1"
- With this option all of the System Use Fields of the System Use Area are
- copied from the CD-ROM to standard output in binary format.
- @.LE
- @.sp
- @.in 0
- @.ft 3
- OPERAND
- @.ft 1
- @.in 2
- @.br
- The operand
- @.I file\^
- is the name of any file or directory within the CD-ROM file hierarchy.
- @.sp
- @.in 0
- @.ft 3
- STDIN
- @.ft 1
- @.in 2
- @.br
- Not Used.
- @.sp
- @.in 0
- @.ft 3
- INPUT FILES
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- ENVIRONMENT VARIABLES
- @.ft 1
- @.in 2
- @.br
- LC_TIME determines the format and contents of date and time strings.
- If LC_TIME is not set in the environment or is set to the empty string,
- the value of LANG will be used as a default.
- If LANG is not set or set to the empty string, the corresponding
- value from the implementation-specific default locale will be used.
- If LC_TIME or LANG contain an invalid setting, the utility will behave
- as if none of the variables had been defined.
- @.sp
- @.in 0
- @.ft 3
- STDOUT
- @.ft 1
- @.in 2
- @.br
- The output is formatted in the form of a table which contains an entry
- for each System Use Field in the System Use Area as recorded on the CD-ROM.
- Each entry of the table shall have the fields
- @.I Signature,\^
- @.I Length,\^
- @.I Version,\^
- and
- @.I Data\^
- as specified in the System Use Sharing Protocol.
- Whether to break up the
- @.I Data\^
- field into smaller fields according to the protocol which defined the
- @.I Signature\^
- field is left up to the implementation.
- @.sp
- If the
- @.ft 3
- -b
- @.ft 1
- option is applied, the contents of the full System Use Area
- are written to standard output in binary format as it is recorded on the CD-ROM.
- @.sp
- @.in 0
- @.ft 3
- STDERR
- @.ft 1
- @.in 2
- @.br
- Used only for diagnostic messages.
- @.sp
- @.in 0
- @.ft 3
- OUTPUT FILES
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- EXIT STATUS
- @.ft 1
- @.in 2
- @.br
- The following exit values are returned:
- @.sp
- @.VL 15 5
- @.LI "0"
- successful completion
- @.LI "1"
- file not found or file is not a file or directory within a CD-ROM file
- hierarchy or access denied
- @.LI "2"
- File Section indicated by -s does not exist
- @.LI "3"
- File Section indicated by -s has no System Use Area
- @.LE
- @.sp
- @.in 0
- @.ft 3
- CONSEQUENCES OF ERRORS
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- APPLICATION USAGE
- @.ft 1
- @.in 2
- @.br
- The user must have read permission for
- @.I file\^
- to execute the command successfully.
- @.sp
- @.in 0
- @.ft 3
- EXAMPLES
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- FUTURE DIRECTIONS
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- SEE ALSO
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- CHANGE HISTORY
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.bp
- @.sp
- @.H 3 "cddevsuppl command"
- @.sp
- @.in 0
- @.ft 3
- NAME
- @.ft 1
- @.in 2
- @.br
- @.ft 3
- cddevsuppl
- @.ft 1
- - set and get the major and minor numbers of a device file
- @.sp
- @.in 0
- @.ft 3
- SYNOPSIS
- @.ft 1
- @.in 2
- @.br
- @.ft 3
- cddevsuppl
- @.ft 1
- [-m mapfile | -u unmapfile] [-c]
- @.sp
- @.in 0
- @.ft 3
- DESCRIPTION
- @.ft 1
- @.in 2
- @.br
- This command is used to map and unmap the major and minor numbers of a device
- file on a mounted CD-ROM.
- @.sp
- If
- @.I cddevsuppl\^
- is executed without the
- @.ft 3
- -m
- @.ft 1
- or
- @.ft 3
- -u
- @.ft 1
- option, it lists the current device file mappings
- on the system.
- @.sp
- The \f3-m mapfile\f1 and \f3-u unmapfile\f1 options are mutually exclusive.
- @.sp
- @.in 0
- @.ft 3
- OPTIONS
- @.ft 1
- @.in 2
- @.br
- The following options are available:
- @.VL 20 5
- @.LI "\f3-m mapfile\f1"
- This option will map the major and minor numbers for device files.
- The mappings are specified in
- @.I mapfile.\^
- This file has one entry for each device file mapping in the format:
- @.sp
- @.TS
- center;
- c c c.
- device_file_path new_major new_minor
- @.TE
- @.sp
- The fields are separated by white space.
- The entries are separated by newlines.
- Anything beyond the third field shall be treated as a comment.
- @.sp
- The maximum number of mappings is defined in the header file
- @.I <sys/cdrom.h>.\^
- A previous device file mapping for a specific device file is overridden
- if that device file that is mapped again.
- @.sp
- @.LI "\f3-u unmapfile\f1"
- This option will unmap the major and minor numbers for device files.
- The mappings are specified in
- @.I unmapfile.\^
- This file has one entry for each device file mapping in the format:
- @.sp
- @.TS
- center;
- c.
- device_file_path
- @.TE
- @.sp
- The entries are separated by newlines.
- Anything beyond the first field shall be treated as a comment.
- @.sp
- @.LI "\f3-c\f1"
- This option is only useful when used in combination with the
- \f3-m mapfile\f1 or \f3-u unmapfile\f1
- options.
- The
- @.ft 3
- -c
- @.ft 1
- option will cause
- @.I cddevsuppl\^
- to continue processing the device file mappings if an error is returned
- for a specific device file mapping.
- An error message for that specific device file will be printed to
- standard error.
- The default action is to stop processing when an error has occurred.
- @.LE
- @.sp
- @.in 0
- @.ft 3
- OPERAND
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- STDIN
- @.ft 1
- @.in 2
- @.br
- Not used.
- @.sp
- @.in 0
- @.ft 3
- INPUT FILES
- @.ft 1
- @.in 2
- @.br
- The input files are text files.
- @.sp
- @.in 0
- @.ft 3
- ENVIRONMENT VARIABLES
- @.ft 1
- @.in 2
- @.br
- No environment variables affect the execution of
- @.I cddevsuppl.\^
- Note that LC_CTYPE will not be used in filename conversion.
- @.sp
- @.in 0
- @.ft 3
- STDOUT
- @.ft 1
- @.in 2
- @.br
- If no options are used the current device file mappings are listed on
- standard output.
- In the case of \f3-m mapfile\f1, the new setting is listed
- if the mapping was completed successfully.
- In the case of \f3-u unmapfile\f1, the device file and
- the major/minor numbers as recorded on the CD-ROM are listed if
- the unmapping was completed successfully.
- @.sp
- @.in 0
- @.ft 3
- STDERR
- @.ft 1
- @.in 2
- @.br
- Used only for diagnostic messages.
- @.sp
- @.in 0
- @.ft 3
- OUTPUT FILES
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- EXIT STATUS
- @.ft 1
- @.in 2
- @.br
- The following exit values are returned:
- @.sp
- @.VL 15 5
- @.LI "0"
- successful completion
- @.LI "1"
- file not found or file is not a file or directory within a CD-ROM file
- hierarchy or access denied
- @.LI "2"
- not user with appropriate privileges
- @.LI "3"
- too many mappings
- @.LI "4"
- parameter error or bad format in a mapping file
- @.LI "5"
- file is not a device file
- @.LI "6"
- file not previously mapped
- @.LE
- @.sp
- @.in 0
- @.ft 3
- CONSEQUENCES OF ERRORS
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- APPLICATION USAGE
- @.ft 1
- @.in 2
- @.br
- Only a user with appropriate privileges may change administrative CD-ROM
- features successfully.
- To read the current device file mappings, the user must have read
- permission on the device file.
- @.sp
- Mappings should be established before affected device files are used.
- If the command is applied for device file mappings when device files
- have already been opened, the
- effect of this command on these files is undefined.
- @.sp
- The device file mappings for a mounted CD-ROM are eliminated when the
- CD-ROM is unmounted.
- @.sp
- @.in 0
- @.ft 3
- EXAMPLES
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- FUTURE DIRECTIONS
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- SEE ALSO
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.ft 3
- CHANGE HISTORY
- @.ft 1
- @.in 2
- @.br
- None.
- @.sp
- @.in 0
- @.bp
- @EOF
-
- chmod 644 api.cmd.nr
-
- echo x - api.lib.nr
- sed 's/^@//' >api.lib.nr <<'@EOF'
- @.sp
- @.H 2 "Definition of CD-ROM Specific Library Functions for Users"
- @.sp
- This sections provides manual pages which describe CD-ROM library functions
- for users in detail.
- The library routines are:
- @.sp
- @.TS
- center;
- l l.
- Name Description
- \_ \_
-
- cd_suf() Retrieve a System Use Field
-
- cd_setdevmap() Set mappings of major/minor numbers
-
- cd_getdevmap() Get mappings of major/minor numbers
- @.TE
- @.sp
- @.bp
- @.sp
- @.H 3 "cd_suf library routine"
- @.sp
- @.in 0
- @.ft 3
- NAME
- @.ft 1
- @.br
- @.in 2
- @.ft 3
- cd_suf
- @.ft 1
- - read System Use Field from a specified System Use Area
- @.sp
- @.in 0
- @.ft 3
- SYNOPSIS
- @.ft 1
- @.in 2
- @.ft 3
- @.br
- #include <sys/cdrom.h>
- @.sp
- int cd_suf (path, fsec, signature, index, buf, buflen)
- @.br
- char *path;
- @.br
- int fsec;
- @.br
- char signature[2];
- @.br
- int index;
- @.br
- char *buf;
- @.br
- int buflen;
- @.sp
- @.ft 1
- @.in 0
- @.ft 3
- DESCRIPTION
- @.ft 1
- @.in 2
- @.br
- @.I Cd_suf\^
- returns a System Use Field in the System Use Area for
- @.I path.\^
- @.sp
- @.I Path\^
- points to a file or directory within the CD-ROM file hierarchy.
- @.sp
- @.I Fsec\^
- specifies the File Section of that file.
- The numbering starts with one.
- If
- @.I fsec\^
- is set to -1, the System Use Area of the last File Section of that file
- is assumed.
- @.sp
- @.I Signature\^
- is the 2 byte signature to look for and return from the System Use Area.
- @.sp
- @.I Index\^
- is the occurrence of
- @.I signature\^
- to return.
- If
- @.I signature\^
- is a NULL pointer, return the
- @.I index\^
- System Use Field starting from the beginning of the System Use Area.
- Otherwise, return the
- @.I index\^
- occurrence of
- @.I signature.\^
- The
- @.I index\^
- number of the first System Use Field of any
- @.I signature\^
- is one.
- @.sp
- @.I Buf\^
- and
- @.I buflen\^
- are the buffer and buffer length in which to place the System Use Field.
- @.sp
- @.in 0
- @.ft 3
- RETURN VALUE
- @.ft 1
- @.in 2
- @.br
- @.I Cd_suf\^
- will return the number of bytes placed in
- @.I buf\^
- if successful.
- @.I Cd_suf\^
- will return 0 if the
- @.I signature\^
- field is not found.
- In case of error, -1 is returned and
- @.I errno\^
- is set to indicate the error.
- @.sp
- @.in 0
- @.ft 3
- ERRORS
- @.ft 1
- @.in 2
- @.br
- The
- @.I cd_suf()\^
- function will fail if:
- @.sp
- @.VL 15
- @.LI "[EACCESS]"
- Search permission is denied for a component of the
- @.I path\^
- prefix or read permission on the file or directory pointed to by
- @.I path\^
- is denied.
- @.LI "[ENAMETOOLONG]"
- The length of the
- @.I path\^
- string exceeds {PATH_MAX} or a pathname component is longer than
- {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect.
- @.LI "[ENOENT]"
- A component of
- @.I path\^
- does not exist or the
- @.I path\^
- argument points to an empty string.
- @.br
- The File Section indicated by
- @.I fsec\^
- has no System Use Area.
- @.LI "[ENOTDIR]"
- A component of the
- @.I path\^
- prefix is not a directory.
- @.LI "[EFAULT]"
- The address of
- @.I buf,\^
- @.I signature\^
- or
- @.I path\^
- is invalid.
- @.LI "[EINVAL]"
- The value of
- @.I fsec,\^
- @.I index\^
- or
- @.I buflen\^
- is invalid.
- @.br
- The argument
- @.I path\^
- points to a file/directory not within a CD-ROM file hierarchy.
- @.LI "[ENODEV]"
- The Volume containing the File Section indicated by
- @.I fsec\^
- is not mounted.
- @.LI "[ENXIO]"
- The CD-ROM is not in the drive or a read error occurred.
- @.LI "[EINTR]"
- A signal was caught during the
- @.I cd_suf()\^
- function.
- @.LI "[EMFILE]"
- {OPEN_MAX} file descriptors are currently open in the calling process.
- @.LI "[ENFILE]"
- The system file table is full.
- @.LE
- @.sp
- @.in 0
- @.ft 3
- SEE ALSO
- @.ft 1
- @.in 2
- @.br
- <sys/cdrom.h>
- @.sp
- @.in 0
- @.bp
- @.sp
- @.H 3 "cd_setdevmap library routine"
- @.sp
- @.in 0
- @.ft 3
- NAME
- @.ft 1
- @.in 2
- @.br
- @.ft 3
- cd_setdevmap
- @.ft 1
- - set mappings of major/minor numbers
- @.sp
- @.in 0
- @.ft 3
- SYNOPSIS
- @.ft 1
- @.in 2
- @.ft 3
- @.br
- #include <sys/cdrom.h>
- @.sp
- int cd_setdevmap (path, cmd, new_major, new_minor)
- @.br
- char *path;
- @.br
- int cmd;
- @.br
- int *new_major;
- @.br
- int *new_minor;
- @.sp
- @.ft 1
- @.in 0
- @.ft 3
- DESCRIPTION
- @.ft 1
- @.in 2
- @.br
- This function sets or unsets (based on
- @.I cmd\^)
- the major and minor numbers of one device file on a mounted CD-ROM.
- The argument
- @.I path\^
- points to a file or directory within the CD-ROM file hierarchy.
- @.sp
- If
- @.I cmd\^
- is CD_SETDMAP, this function maps the
- @.I new_major
- major number and the
- @.I new_minor
- minor number to the device file pointed to by
- @.I path.
- @.I New_major\^
- specifies the new major number for the device file.
- @.I New_minor\^
- specifies the new minor number for the device file.
- Any device file mapping for the device file
- @.I path\^
- set with a previous invocation of
- @.I cd_setdevmap()\^
- is overridden by this invocation of
- @.I cd_setdevmap().\^
- @.sp
- If
- @.I cmd\^
- is CD_UNSETDMAP, this function unmaps the mapped major and
- minor numbers of the device file pointed to by
- @.I path.\^
- The value of the recorded major number on the CD-ROM shall be returned in
- @.I new_major.\^
- The value of the recorded minor number on the CD-ROM shall be returned in
- @.I new_minor.\^
- @.sp
- See
- @.ft 3
- Section 1.1, Mapping Device Files
- @.ft 1
- for further information.
- @.sp
- @.in 0
- @.ft 3
- RETURN VALUE
- @.ft 1
- @.in 2
- @.br
- For CD_SETDMAP,
- @.I cd_setdevmap\^
- will return one if the device file is successfully mapped
- (a return value of zero means no more mappings allowed).
- @.sp
- For CD_UNSETDMAP,
- @.I cd_setdevmap\^
- will return one if the device file is successfully unmapped
- (a return value of zero means mapping not found).
- @.sp
- In case of error, -1 is returned and
- @.I errno\^
- is set to indicate the error.
- @.sp
- @.in 0
- @.ft 3
- ERRORS
- @.ft 1
- @.in 2
- @.br
- @.VL 15
- @.LI "[EACCESS]"
- Search permission is denied for a component of the
- @.I path\^
- prefix or read permission on the device file pointed to by
- @.I path\^
- is denied.
- @.LI "[ENAMETOOLONG]"
- The length of the
- @.I path\^
- string exceeds {PATH_MAX} or a pathname component is longer than
- {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect.
- @.LI "[ENOENT]"
- A component of
- @.I path\^
- does not exist or the
- @.I path\^
- argument points to an empty string.
- @.LI "[ENOTDIR]"
- A component of the
- @.I path\^
- prefix is not a directory.
- @.LI "[EFAULT]"
- The address of
- @.I path,\^
- @.I new_major,\^
- or
- @.I new_minor\^
- is invalid.
- @.LI "[EINVAL]"
- The value of
- @.I cmd\^
- is invalid.
- @.br
- The argument
- @.I path\^
- points to a file/directory not within a CD-ROM file hierarchy.
- @.br
- The file pointed to by
- @.I path\^
- is not a device file.
- @.LI "[EPERM]"
- User does not have appropriate privileges to set/unset device file
- major/minor values.
- @.LI "[ENXIO]"
- The CD-ROM is not in the drive or a read error occurred.
- @.LI "[EINTR]"
- A signal was caught during the
- @.I cd_setdevmap()\^
- function.
- @.LI "[EMFILE]"
- {OPEN_MAX} file descriptors are currently open in the calling process.
- @.LI "[ENFILE]"
- The system file table is full.
- @.LE
- @.sp
- @.in 0
- @.ft 3
- APPLICATION USAGE
- @.ft 1
- @.in 2
- @.br
- The use of
- @.I cd_setdevmap()\^
- is restricted to a user with appropriate privileges.
- The maximum number of mappings is defined in
- @.I <sys/cdrom.h>.\^
- Mappings should be established before affected device files are used.
- If this function is applied for device files that have already been opened,
- the effect of this function on these files is undefined.
- The device file mappings for a mounted CD-ROM are eliminated when the
- CD-ROM is unmounted.
- @.sp
- @.in 0
- @.ft 3
- SEE ALSO
- @.ft 1
- @.in 2
- @.br
- <sys/cdrom.h>
- @.sp
- @.in 0
- @.bp
- @.sp
- @.H 3 "cd_getdevmap library routine"
- @.sp
- @.in 0
- @.ft 3
- NAME
- @.ft 1
- @.in 2
- @.br
- @.ft 3
- cd_getdevmap
- @.ft 1
- - get mappings of major/minor numbers
- @.sp
- @.in 0
- @.ft 3
- SYNOPSIS
- @.ft 1
- @.in 2
- @.ft 3
- @.br
- #include <sys/cdrom.h>
- @.sp
- int cd_getdevmap (path, pathlen, index, new_major, new_minor)
- @.br
- char *path;
- @.br
- int pathlen;
- @.br
- int index;
- @.br
- int *new_major;
- @.br
- int *new_minor;
- @.sp
- @.ft 1
- @.in 0
- @.ft 3
- DESCRIPTION
- @.ft 1
- @.in 2
- @.br
- This function gets
- the major and minor numbers of one device file on a mounted CD-ROM.
- The argument
- @.I path\^
- points to a file or directory within the CD-ROM file hierarchy.
- The argument
- @.I index\^
- refers to the \f2index\f1'th mapped device file.
- Mappings can be obtained by
- @.I path\^
- or
- @.I index.\^
- @.sp
- If
- @.I index\^
- is zero, this function gets the mapped major and minor numbers
- of the device file pointed to by
- @.I path.\^
- The value of the mapped major number shall be returned in
- @.I new_major.\^
- The value of the mapped minor number shall be returned in
- @.I new_minor.\^
- The value of
- @.I pathlen\^
- is not used.
- @.sp
- If
- @.I index\^
- is not zero, this function gets the major and minor numbers
- and pathname of the \f2index\f1'th mapped device file.
- Numbering for
- @.I index\^
- starts at one.
- The value of the mapped major number shall be returned in
- @.I new_major.\^
- The value of the mapped minor number shall be returned in
- @.I new_minor.\^
- The pathname of the device file shall be returned in
- @.I path.\^
- If the length of the pathname for the device file is longer than
- @.I pathlen\^
- the pathname returned in
- @.I path\^
- will be truncated to
- @.I pathlen\^
- length and will not be NULL terminated.
- @.sp
- See
- @.ft 3
- Section 1.1, Mapping Device Files
- @.ft 1
- for further information.
- @.sp
- @.in 0
- @.ft 3
- RETURN VALUE
- @.ft 1
- @.in 2
- @.br
- @.I cd_getdevmap\^
- will return the length of pathname if the device file is
- successfully returned
- (a return value of zero means mapping not found).
- Note: if the pathname is truncated, the return value will be
- larger than
- @.I pathlen.\^
- @.sp
- In case of error, -1 is returned and
- @.I errno\^
- is set to indicate the error.
- @.sp
- @.in 0
- @.ft 3
- ERRORS
- @.ft 1
- @.in 2
- @.br
- @.VL 15
- @.LI "[EACCESS]"
- Search permission is denied for a component of the
- @.I path\^
- prefix or read permission on the device file pointed to by
- @.I path\^
- is denied.
- @.LI "[ENAMETOOLONG]"
- The length of the
- @.I path\^
- string exceeds {PATH_MAX} or a pathname component is longer than
- {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect.
- @.LI "[ENOENT]"
- A component of
- @.I path\^
- does not exist or the
- @.I path\^
- argument points to an empty string.
- @.LI "[ENOTDIR]"
- A component of the
- @.I path\^
- prefix is not a directory.
- @.LI "[EFAULT]"
- The address of
- @.I path,\^
- @.I new_major,\^
- or
- @.I new_minor\^
- is invalid.
- @.LI "[EINVAL]"
- The value of
- @.I index\^
- or
- @.I pathlen\^
- is invalid.
- @.br
- The argument
- @.I path\^
- points to a file/directory not within a CD-ROM file hierarchy.
- @.br
- The file pointed to by
- @.I path\^
- is not a device file.
- @.LI "[ENXIO]"
- The CD-ROM is not in the drive or a read error occurred.
- @.LI "[EINTR]"
- A signal was caught during the
- @.I cd_getdevmap()\^
- function.
- @.LI "[EMFILE]"
- {OPEN_MAX} file descriptors are currently open in the calling process.
- @.LI "[ENFILE]"
- The system file table is full.
- @.LE
- @.sp
- @.in 0
- @.ft 3
- APPLICATION USAGE
- @.ft 1
- @.in 2
- @.br
- The maximum number of mappings is defined in
- @.I <sys/cdrom.h>.\^
- The device file mappings for a mounted CD-ROM are undone when the
- CD-ROM is unmounted.
- @.sp
- The
- @.I index\^
- numbers from 1 to
- @.I n\^
- (where
- @.I n\^
- is the number of the last device file mapping)
- are always guaranteed to have a device file mapping associated
- with the number.
- Thus if an application wishes to successively delete all
- device file mappings, one at a time, it would call
- @.I cd_getdevmap()\^
- with
- @.I index\^
- equal to 1, and then
- @.I cd_setdevmap()\^
- with CD_UNSETDMAP in a loop until
- @.I cd_getdevmap()\^
- returns zero.
- @.sp
- @.in 0
- @.ft 3
- SEE ALSO
- @.ft 1
- @.in 2
- @.br
- <sys/cdrom.h>
- @.sp
- @.in 0
- @.bp
- @EOF
-
- chmod 644 api.lib.nr
-
- echo x - api.end.nr
- sed 's/^@//' >api.end.nr <<'@EOF'
- @.sp
- @.H 2 "Header"
- @.sp
- @.in 0
- @.ft 3
- NAME
- @.ft 1
- @.br
- @.in 2
- @.ft 3
- cdrom.h
- @.ft 1
- - RRIP definitions
- @.sp
- @.in 0
- @.ft 3
- SYNOPSIS
- @.ft 1
- @.in 2
- @.ft 3
- @.br
- #include <sys/cdrom.h>
- @.sp
- @.ft 1
- @.in 0
- @.ft 3
- DESCRIPTION
- @.ft 1
- @.in 2
- @.br
- The
- @.I cdrom.h\^
- header contains the RRIP constant definitions for the RRIP library functions.
- If XCDR is supported, this header file will also contain
- the XCDR constants and structure declarations for the XCDR library functions.
- @.sp
- The function
- @.I cd_setdevmap()\^
- uses the following values for the argument
- @.I cmd:\^
- @.sp
- @.TS
- center;
- l l.
- CD_SETDMAP Set device file mapping
- CD_UNSETDMAP Unset device file mapping
- @.TE
- @.sp
- If an implementation imposes a limit on the number of device file mappings,
- they will be defined by the following symbolic name.
- The definition of this symbolic name may be omitted from
- @.I <sys/cdrom.h>\^
- if the actual value of the limit is indeterminate but greater than
- the stated minimum.
- Applications should therefore only use this symbol in code
- conditionally compiled on the existence of this symbol.
- @.sp
- @.TS
- center;
- l l.
- Name Minimum Acceptable Value
- \_ \_
- CD_MAXDMAP 50
- @.TE
- @.sp
- @.sp
- @.bp
- @.sp
- @.H 2 "Recommendations for CD-ROM Publishers"
- @.sp
- Unless the CD-ROM is targetted at a specific collection of systems, the
- values for major and minor numbers of device files will not identify
- the correct values on the receiving system.
- Also the range of values for device file major and minor numbers
- that a system can handle might be smaller than what can be recorded
- on the CD-ROM.
- When producing a CD-ROM to be used on various systems, it is recommended
- that the publisher number the device major and minor numbers consecutively
- starting at 0 and provide the System Administrator with sufficient
- information to map each recorded major and minor number to the appropriate
- values for the target system.
- @.sp
- @EOF
-
- chmod 644 api.end.nr
-
- echo x - bib.nr
- sed 's/^@//' >bib.nr <<'@EOF'
- @.sp
- @.H 1 "BIBLIOGRAPHY"
- @.sp
- @.BL
- @.LI
- ISO 9660:1988 - Information Processing - Volume and file structure of
- CD-ROM for information interchange
- @.LI
- IEEE Standard Portable Operating System Interface for Computer Environments,
- IEEE std 1003.1-1988 (a.k.a POSIX Standard), New York, New York:IEEE
- @.LI
- X/Open CD-ROM Support Component (XCDR), Version 4.0 December 1990
- @.LI
- X/Open Portability Guide, Volume 3, XSI Supplementary Definitions,
- Prentice Hall, 1989
- @.LI
- System Use Sharing Protocol, Rock Ridge Group
- @.LI
- Wong, T. September 12, 1989. Extensions to the ISO 9660 CD-ROM Volume
- and File Structure Format to support POSIX File System Semantics.
- @.LE
- @EOF
-
- chmod 644 bib.nr
-
- echo x - TOC
- sed 's/^@//' >TOC <<'@EOF'
- @.TC 1 1 4
- @EOF
-
- chmod 644 TOC
-
- exit 0
-
-